package kr.couponplay.android;

import java.util.ArrayList;
import java.util.List;

public class Category {
	private int id;
	private String name;
	private String code;
	private int levelNo;
	private int orderNo;
	private int parentId;
	private List<Category> children = new ArrayList<Category>();
	
	public Category copy() {
		Category copy = new Category();
		copy.setId(id);
		copy.setName(name);
		copy.setLevelNo(levelNo);
		copy.setOrderNo(orderNo);
		copy.setParentId(parentId);
		return copy;
	}
	
	public void addChild(Category child) {
		if (children == null) {
			children = new ArrayList<Category>();
		}
		children.add(child);
	}

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getLevelNo() {
		return levelNo;
	}
	public void setLevelNo(int levelNo) {
		this.levelNo = levelNo;
	}
	public int getOrderNo() {
		return orderNo;
	}
	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}
	public int getParentId() {
		return parentId;
	}
	public void setParentId(int parentId) {
		this.parentId = parentId;
	}
	public List<Category> getChildren() {
		return children;
	}
	public void setChildren(List<Category> children) {
		this.children = children;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
}